package pojo;

import java.time.LocalDateTime;

/**
 * 用户表实体类
 */
public class User {
    private Integer id;          // 用户ID（与数据库一致）
    private String username;     // 用户名(唯一)
    private String password;     // 密码
    private String phone;        // 手机号
    private String email;        // 邮箱
    private Boolean isLocked;    // 锁定状态(0-禁用,1-启用，驼峰命名)
    private LocalDateTime createTime; // 创建时间（驼峰命名）

    // Getter 和 Setter 方法
    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }

    public String getUsername() { return username; }
    public void setUsername(String username) { this.username = username; }

    public String getPassword() { return password; }
    public void setPassword(String password) { this.password = password; }

    public String getPhone() { return phone; }
    public void setPhone(String phone) { this.phone = phone; }

    public String getEmail() { return email; }
    public void setEmail(String email) { this.email = email; }

    public Boolean getIsLocked() { return isLocked; }
    public void setIsLocked(Boolean isLocked) { this.isLocked = isLocked; }

    public LocalDateTime getCreateTime() { return createTime; }
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", isLocked=" + isLocked +
                ", createTime=" + createTime +
                '}';
    }
}